"Commit your texture changes and return to regular editing\n (you can't just bail; instead, Undo your changes then commit)\n (if, in spite of my efforts, you find some way to close this box without hitting `commit', you will have made a mess.",
punch_inner = qmenu.item("Punch &Inner",PunchInnerClick,"|Subtract the interior of the tunnel from the marked group")
punch_outer = qmenu.item("Punch &Outer",PunchOuterClick,"|Subtract the interior and the walls of the corrridor from the marked group.\n Onely work works for `pipe'-type.")
punch_inner = qmenu.item("Punch &Inner",PunchInnerClick,"|Subtract the interior of the tunnel from the marked group")
punch_outer = qmenu.item("Punch &Outer",PunchOuterClick,"|Subtract the interior and the walls of the corrridor from the marked group.\n Onely work works for `pipe'-type.")
punch_inner = qmenu.item("Punch &Inner",PunchInnerClick,"|Subtract the interior of the tunnel from the marked group")
punch_outer = qmenu.item("Punch &Outer",PunchOuterClick,"|Subtract the interior and the walls of the corrridor from the marked group.\n Onely work works for `pipe'-type.")
for (label, opt, hint) in (("track", "track", "|Texture scale is shifted as is to the other segments, tracking direction changes"),
# ("Lapped", "lapped","|Texture is wrapped around corners to other segments"),
("project", "project","|Texture is projected onto other segments.\n\n (good for some floors.)")):
item = qmenu.item(label, TexOptClick, hint)
item.opt = opt
if opt == curr_opt:
item.state = qmenu.checked
list.append(item)
wrap_texture = qmenu.popup("&Wrap Texture",list)
revert = qmenu.item("Revert",RevertClick,"|Convert extruder group back to duplicator.\n\nThe effects of retexturing, holes made etc will all be lost.")
class PathExtrusionDlg(quarkpy.dlgclasses.LiveEditDlg):
endcolor = AQUA
size = (220,180)
dfsep = 0.5
dlgdef = """
{
Style = "9"
Caption = "Path Extrusion Parameters"
origin: = {Txt="&" Typ = "EF3"
Hint = "Location in map."}
segments: = {Txt="&" Typ = "EF1"
Hint = "Number of segments"}
seg len: = {Txt="&" Typ = "EF1"
Hint = "length of each segment"}
start angle: = {Txt="&" Typ = "EF2"
Hint = "Starting angle; pitch, yaw relative to Eastward axis." $0D " e.g. 0 0 for due East."}
turn angle: = {Txt="&" Typ = "EF2"
Hint = "Total turning angle; pitch, yaw relative to starting angle." $0D " e.g. 0 90 for a quarter-circle heading North."}
sep: = { Typ="S" Txt = " "}
no update: = {Txt="&" Typ = "X"
Hint = "If this is checked, the duplicator is not actualy updated when new data is entered (uncheck to set changes)." $0D " Useful to speed things up with big ones, or to prevent errors during revisions."}
}"""
class RadialExtrusionDlg(quarkpy.dlgclasses.LiveEditDlg):
endcolor = AQUA
size = (220,200)
dfsep = 0.5
dlgdef = """
{
Style = "9"
Caption = "Radial Extrusion Parameters"
origin: = {Txt="&" Typ = "EF3"
Hint = "Location in map."}
segments: = {Txt="&" Typ = "EF1"
Hint = "Number of segments"}
center: = {Txt="&" Typ = "EF3"
Hint = "location of center for radial sweep." $0D " e.g. 0 -256 0 (relative to origin of duplicator by default)."}
absolute: = {Txt="&" Typ = "X"
Hint = "If checked, the center is located in absolute map coordinates" $0D " rather than relative to the origin of the duplicator."}
normal: = {Txt="&" Typ = "EF3"
Hint = "Normal to the plane of the sweep."}
sweep angle: = {Txt="&" Typ = "EF1"
Hint = "Degrees of arc swept out, in degrees." $0D " e.g. 360 for a full circle"}
sep: = { Typ = "S" Txt = " "}
no update: = {Txt="&" Typ = "X"
Hint = "If this is checked, the duplicator is not actualy updated when new data is entered (uncheck to set changes)." $0D " Useful to speed things up with big ones, or to prevent errors during revisions."}
}"""
def PathExtrudeClick(btn):
data = btn.data
dup = data.dup
# squawk(`data.PathLen()`)
if data.PathLen()>2:
if dup["turn angle"] is None:
ans = quarkx.msgbox("Entering data into this dialog will overwrite previous work on this map object. Do you wish to procede?",
MT_WARNING, MB_YES|MB_NO)
if ans==MR_NO:
return
def setup(self, data = data):
src = self.src
self.data = data
dup = self.dup = self.data.dup
src["origin"] = dup.origin.tuple
src["segments"] = data.PathLen()-1,
src["seg len"] = abs(data.PathPos(1)-data.Org()),
CopyDefaultSpec(dup, src, "start angle", "")
CopyDefaultSpec(dup, src, "turn angle", "")
def action(self, data=data, editor=btn.editor):
quarkx.globalaccept()
src = self.src
if src["no update"] or AnyIsNone(src,["start angle", "turn angle"]):